package com.example.administrator.himalaya.criticallies;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.widget.DrawerLayout;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.example.administrator.himalaya.R;
import com.example.administrator.himalaya.activity.LoginActivity;
import com.example.administrator.himalaya.activity.SettingActivity;

public class FourthFragment extends Fragment implements View.OnClickListener {


    private DrawerLayout mDrawerLayout;
    private FragmentManager mManager;

    public FourthFragment() {

    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View ret = inflater.inflate(R.layout.fragment_fourth, container, false);

        Button login1 = (Button) ret.findViewById(R.id.login1);
        TextView login2 = (TextView) ret.findViewById(R.id.login2);
        TextView login3 = (TextView) ret.findViewById(R.id.login3);
        TextView login4 = (TextView) ret.findViewById(R.id.login4);
        TextView login5 = (TextView) ret.findViewById(R.id.login5);
        TextView login6 = (TextView) ret.findViewById(R.id.login6);
        TextView login7 = (TextView) ret.findViewById(R.id.login7);
        TextView login8 = (TextView) ret.findViewById(R.id.login8);
        TextView login9 = (TextView) ret.findViewById(R.id.login9);
        TextView login10 = (TextView) ret.findViewById(R.id.login10);
        TextView login11 = (TextView) ret.findViewById(R.id.login11);
        TextView login12 = (TextView) ret.findViewById(R.id.login12);
        TextView login13 = (TextView) ret.findViewById(R.id.login13);
        TextView login14 = (TextView) ret.findViewById(R.id.login14);
        TextView login15 = (TextView) ret.findViewById(R.id.login15);
        TextView login16 = (TextView) ret.findViewById(R.id.login16);
        TextView login17 = (TextView) ret.findViewById(R.id.login17);
        TextView login18 = (TextView) ret.findViewById(R.id.login18);
        TextView login19 = (TextView) ret.findViewById(R.id.login19);
        TextView login20 = (TextView) ret.findViewById(R.id.login20);
        login1.setOnClickListener(this);
        login2.setOnClickListener(this);
        login3.setOnClickListener(this);
        login4.setOnClickListener(this);
        login5.setOnClickListener(this);
        login6.setOnClickListener(this);
        login7.setOnClickListener(this);
        login8.setOnClickListener(this);
        login9.setOnClickListener(this);
        login11.setOnClickListener(this);
        login12.setOnClickListener(this);
        login13.setOnClickListener(this);
        login14.setOnClickListener(this);
        login15.setOnClickListener(this);
        login16.setOnClickListener(this);
        login17.setOnClickListener(this);
        login18.setOnClickListener(this);
        login19.setOnClickListener(this);
        login20.setOnClickListener(this);

        return ret;
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.login1:
            case R.id.login2:
            case R.id.login3:
            case R.id.login4:
            case R.id.login5:
            case R.id.login6:
            case R.id.login7:
            case R.id.login8:
            case R.id.login9:
            case R.id.login10:
            case R.id.login11:
            case R.id.login12:
            case R.id.login13:
            case R.id.login14:
            case R.id.login15:
            case R.id.login16:
            case R.id.login17:
            case R.id.login18:
            case R.id.login19:
                Intent intent = new Intent(getContext(), LoginActivity.class);
                getContext().startActivity(intent);
                break;
            case R.id.login20:
                Intent intent1 = new Intent(getContext(), SettingActivity.class);
                getContext().startActivity(intent1);
                break;
        }

    }
}
